import 'package:flutter/material.dart';
void main()=>runApp(MyApp());

class MyApp extends StatelessWidget{
  Widget build(BuildContext context){
    return MaterialApp(
      home:Scaffold(
        appBar: AppBar(
          title: Text("data",
          textAlign: TextAlign.right,
          ),
        ),
        body: Center(child: Container(
          child: Text("这这里是一个这这里是一个文本这里是一个文本里是一个文本文本这里是一个文本里是一个文本",
          textAlign: TextAlign.center,
          overflow: TextOverflow.ellipsis,
          maxLines: 1,//设置行数
          
          style: TextStyle(
            fontSize: 18,
            fontWeight: FontWeight.w600,
            color: Colors.red
          ),
          ),
          height: 300,
          width: 300,
          margin: EdgeInsets.all(20),
          padding: EdgeInsets.all(20),
          alignment: Alignment.bottomCenter,
          decoration: BoxDecoration(
            color: Colors.yellow,//容器的背景颜色
            borderRadius:BorderRadius.all(Radius.circular(8)),
            border: Border.all(
              color: Colors.blue,
            )
          ),
        )),
      ),
    );
  }
}
